package com.ct.controller.shipping;

import com.ct.application.shipping.model.po.ChuanBoXinXiZhiWeiSavePO;
import com.ct.application.shipping.service.ChuanBoXinXiZhiWeiService;
import com.ct.commons.BaseController;
import com.ct.commons.annotation.ApiLog;
import com.ct.commons.annotation.HasAdmin;
import com.ct.commons.annotation.PermissionApi;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 船舶职位信息
 * @author Auto Generator
 * @since 2023-08-16
 */
@RestController
@PermissionApi(title = "船舶职位信息",path="/api/v1/chuanboxinxizhiwei",code = "F1000",sorted = 6)
public class ChuanBoXinxiZhiweiController extends BaseController {

    @Resource
    private ChuanBoXinXiZhiWeiService chuanBoXinXiZhiWeiService;



    /**
     * 保存和更新
     *
     * @param savePO
     * @return
     */
    @PostMapping("/chuanboxinxizhiwei/saveupdate")
    @ApiLog("船舶职位信息保存和更新")
    @HasAdmin
    @PermissionApi(title = "船舶职位信息保存和更新",path="/api/v1/chuanboxinxizhiwei/saveupdate",code = "F1003",sorted = 1)
    public Boolean saveUpdateChuanBoZhiWei(@Validated @RequestBody ChuanBoXinXiZhiWeiSavePO savePO) {
        return chuanBoXinXiZhiWeiService.saveChuanBoXinXiZhiWei(savePO);
    }

}
